package com.zhongli.devplatform.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum ReportGroupByDate {

    EVERY_YEAR(0,"%Y"),//每年
    EVERY_MONTH(1,"%Y-%m"),//每月
    EVERY_WEEKLY(2,"%Y-%u"),//每周
    EVERY_DAY(3,"%Y-%m-%d");//每天

    @JsonValue
    private int code;

    @EnumValue
    private String groupBy;

    ReportGroupByDate(int code, String groupBy) {
        this.code = code;
        this.groupBy = groupBy;
    }
}
